<% if @success %>
    $(".rating span#<%= dom_id(@target) %>").replaceWith('<%= html_tag_for_rating(@target) %>');
    ShowNotify("<%= @success %>", "notice");
<% else %>
    ShowNotify("<%= @error %>", "alert");
<% end %>